<?php
class ErrorController extends ControllerBase {

	public function init(){
		Yii::app()->theme = SITE_THEME;
		$this->layout 		= '//layouts/none';
		parent::init();
	}

    public function actionShow() {
    	if ($error = Yii::app()->errorHandler->error) {
            if (Yii::app()->request->isAjaxRequest)
                echo $error['message'];
            else
                $this->render('show', $error);
        }
    }
}